def tsbytestostr(data):
    if (isinstance(data,(tuple)) or isinstance(data,(list))):
        lendata = len(data)
        ret = []
        for i in range(lendata):
          ret.append(tsbytestostr(data[i]))
    elif isinstance(data,(dict)):
        lendata = len(data)
        ret ={}
        for i in data:
            ret[tsbytestostr(i)] = tsbytestostr(data[i])
    elif isinstance(data,(bytes)):
         ret = data.decode('gbk', errors='ignore')
    else:
        ret = data
    return ret
